<?php namespace module\news;

use module\HdMessage;
use system\model\ReplyNews;

class Message extends HdMessage {
//    回复内容
    public function display(){
        return View::fetch('module/news/tem/display.php');
    }




//    提交
    public function submit($kid){
        $module = new ReplyNews();
        $data = json_decode(Request::post('data'),true);
        foreach ($data as $k => $v){
            $module['title']  = $v['Title'];
            $module['description'] = $v['Description'];
            $module['thumb'] = $v['PicUrl'];
            $module['url'] = $v['Url'];
            $module['type']  = $v['type'];
            $module['content'] = $v['content'];
            $module['kid'] = $kid;
            $module->save();
        }
        return true;
    }

}